package processor;

import javax.swing.JFrame;

import ui.ChatWin;

public class SwitchWin {
	private ChatWin chatWin;
	private JFrame loginWin;
	public SwitchWin(JFrame chatWin, JFrame loginWin) {
		super();
		this.chatWin = (ChatWin) chatWin;
		this.loginWin = loginWin;
	}
	
	public void proceed(String from){
		loginWin.dispose();
		chatWin.setVisible(true);
		chatWin.setUserName(from);
		chatWin.getChatArea().setText("Current User: "+from+"\n----------------------------------------------");
	}

}
